home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98a.txt
/
000093_icon-group-sender _Wed Mar 4 16:30:06 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by baskerville.CS.Arizona.EDU (8.8.7/8.8.7) with SMTP id QAA18097
for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Wed, 4 Mar 1998 16:30:06 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA07198; Wed, 4 Mar 1998 16:30:05 -0700
Date: Wed, 4 Mar 1998 21:04:52 +0300 (MEST)
From: Ehud Lamm <mslamm@mscc.huji.ac.il>
To: gep2@computek.net
Cc: icon-group@optima.CS.Arizona.EDU
Subject: Re: Icon to C conversion
In-Reply-To: <199803030539.XAA24309@axp.cmpu.net>
Message-Id: <Pine.A32.3.91.980304210200.30650A-100000@pluto.mscc.huji.ac.il>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Content-Length: 1002
>
> You can't really use C-style null-terminated strings as Icon strings, since I$
> strings can ABSOLUTELY contain one or more embedded binary zero bytes.
>
> This makes the C strlen() function essentially useless. You have to implemen$
> strings in some other way, perhaps maintaining a separate count somewhere.
To make myself clearer: I didn't mean to say C string are the same as
Icon strings. I just gave an example of a kind of optimization you *may*
perform. For example you may decide to treat certain known strings as C
strings, or to allow this optimization if the programmer specifies it is
allowed.
The question really isn't wether C strings can be used as Icon strings,
but rather that in order to produce good C code to function exactly like
the Icon code (as compiled Icon should), you have first to deeply explore
the bset ways to do the desired things in C. You shouldn't only think
about compilation techniques and optimizations.
Ehud Lamm mslamm@pluto.mscc.huji.ac.il